package com.springboot.util.enums;

import java.util.Map;

/**
 * @ClassName SendMessageCode
 * @Description 消息发送模板
 * @Author zyj
 * @Date 2023/5/17 17:49
 * @Version 1.0
 **/
public enum SendMessageCodeEnum {
    /**
     * 博客邮箱注册
     */
    EMAIL_CODE_REGISTER("e1001", "您的注册码为${code},五分钟内有效！", new String[]{"\\$\\{code\\}"});

    private String value;
    private String temp;
    private String[] replaceValue;

    SendMessageCodeEnum(String value, String temp, String[] replaceValue) {
        this.value = value;
        this.temp = temp;
        this.replaceValue = replaceValue;
    }

    public static String getDescripe(String code) {
        for (RespErrorCode managerErrorCode : RespErrorCode.values()) {
            if (code.equals(managerErrorCode.getValue())) {
                return managerErrorCode.getDescripe();
            }
        }
        return "";
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getTemp() {
        return temp;
    }

    public void setTemp(String temp) {
        this.temp = temp;
    }


    public String[] getReplaceValue() {
        return replaceValue;
    }

    public void setReplaceValue(String[] replaceValue) {
        this.replaceValue = replaceValue;
    }
}
